﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace rimz
{
    public partial class Home : System.Web.UI.Page
    {

        protected RimzDataDataContext dataContext;

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                dataContext = new RimzDataDataContext();

                // set user's firstname on the greeting title
                var userFirstNames = from u in dataContext.Users
                                     where u.UserLogin == Session["username"].ToString()
                                     select u.FirstName;

                var aUserFirstName = userFirstNames.Single();

                LabelUserFirstName.Text = aUserFirstName.ToString();
            }
            catch (Exception exp)
            {
                exp.ToString();
            }
            
        }

    } // class
} // namespace
